package lockTest;

public class RotationThread {
    public static void main(String[] args) {
        String ss = new String("lock");
        int i = 0 ;
        Thread t1 = new Thread(()->{
            synchronized (ss){
               if(i == 0) {
                   try {
                       ss.wait();
                   } catch (InterruptedException e) {
                       e.printStackTrace();
                   }
               }
                System.out.println("A");
            }
        });
    }
}
